package com.bite.demo.controller;

import org.springframework.web.bind.annotation.*;

@RequestMapping("/Hello")
@RestController
public class HelloController {

    @RequestMapping("/hello")
    public String hello() {
        return "hello spring mvc";
    }

    //仅支持Get 和 POST 请求
    @RequestMapping(value = "/hello2",method ={ RequestMethod.GET,RequestMethod.POST})
    public String hello2() {
        return "hello2";
    }

    @PostMapping("/hello3")
    public String hello3() {
        return   "hello3";
    }

    @GetMapping("/hello3")
    public String hello4() {
        return "hello4";
    }
   /* @GetMapping("/hello3")
    public String hello5() {
        return "hello5";
    }
*/

}
